package com.gcb.common.enums;

/**
 * 运输类型
 */
public enum TransportType {
    COASTAL(0, "沿海运输"),
    LANDLOCKED(1, "内陆运输");

    private final Integer code;
    private final String info;

    TransportType(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public Integer getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfoByCode(Integer code) {
        for (TransportType transportType : TransportType.values()) {
            if (transportType.getCode().equals(code)) {
                return transportType.getInfo();
            }
        }
        return null;
    }
}
